<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!-- START MENU-EDIT -->
<form method="post" action="${pageContext.request.contextPath}/menu/save?menuid=${menu.id}">
<h4 class="heading">${menu.name}<span class="lnr lnr-cog pull-right"></span></h4>
<div class="menu-edit">
    <div class="edit-group">
        <div class="input-group">
            <span class="input-group-addon">名称：</span>
            <input class="form-control" type="text" value="${menu.name}">
        </div>
    </div>
    <div class="edit-group">
        <div class="input-group">
            <span class="input-group-addon">父级：</span>
            <input class="form-control" type="text" value="${parMenus}" readonly>
        </div>
    </div>
    <div class="edit-group">
        <div class="input-group">
            <span class="input-group-addon">子级：</span>
            <input class="form-control" type="text" value="${subMenus}" title="${subMenus}" readonly>
        </div>
    </div>
    <div class="edit-group">
        <div class="input-group">
            <span class="input-group-addon">路径：</span>
            <input class="form-control" type="text" placeholder="/路径名" value="/${menu.requesturl}">
        </div>
    </div>
    <div class="edit-group">
        <div class="input-group">
            <span class="input-group-addon">图标：</span>
            <input class="form-control" type="text" value="${menu.micon}">
        </div>
    </div>
    <div class="edit-group">
        <div class="input-group">
            <span class="input-group-addon">序号：</span>
            <input class="form-control" type="text" value="${menu.sort}">
        </div>
    </div>
    <div class="edit-group">
        <div class="input-group">
            <span class="input-group-addon">显示：</span>
            <input class="form-control" type="text" value="${menu.isshow}">
        </div>
    </div>
    <div class="edit-group">
        <div class="input-group">
            <span class="input-group-addon">备注：</span>
            <input class="form-control" type="text" value="${menu.remark}">
        </div>
    </div>
    <div class="margin-top-30 text-center">
        <a href="javascript:void(0)" onclick="addSubMenu('${menu.id}')" class="btn btn-primary">新增子菜单</a>
        <a href="#" class="btn btn-success">保存</a>
        <a href="#" class="btn btn-danger">删除</a>
    </div>
</div>
</form>
<!-- END MENU-EDIT -->
<script>
    function addSubMenu(menuid) {
        layer.open({
            type: 2, // Page层类型
            area: ['60%', '70%'],
            title: '${menu.name} | 新增子菜单',
            shade: 0.3, // 遮罩透明度
            anim: 0,
            content: ['${pageContext.request.contextPath}/menu/addMenu?pid=' + menuid, 'no'],
            cancel: function(){
                //右上角关闭回调

                //return false 开启该代码可禁止点击该按钮关闭
            }
        });
    }
</script>